package demo.com.xml;

import android.os.Bundle;
import android.os.Environment;
import android.support.v7.app.AppCompatActivity;

import java.io.FileInputStream;
import java.io.FileNotFoundException;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        SAXXmlParser saxXmlParser = new SAXXmlParser();
        try {
            saxXmlParser.parse(new FileInputStream(Environment.getExternalStorageDirectory().getPath()
                    + "/Download/RouteService.xml"));
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }

        PullXmlParser pullXmlParser = new PullXmlParser();
        try {
            pullXmlParser.parse(new FileInputStream(Environment.getExternalStorageDirectory().getPath()
                    + "/Download/RouteService.xml"));
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }
}
